package com.cykj.controller;

import com.cykj.dto.ResponseDTO;
import com.cykj.service.IOrderService;
import com.cykj.vo.CyOrderVO;
import com.cykj.vo.OrderVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 王宇
 * @CreateTime: 2025-07-22  15:28
 * @BelongsProject: jd_seckill
 * @BelongsPackage: com.cykj.controller
 * @description 订单管理
 */
@RestController
@RequestMapping("/jd/cli/order")
public class OrderController {
    @Autowired
    private IOrderService orderService;

    @GetMapping("/getOrderList")
    public ResponseDTO getOrderList(OrderVO orderVO) {
        return orderService.getOrderList(orderVO);
    }

    @RequestMapping("/buy")
    public ResponseDTO buy(CyOrderVO orderVO) {
        return orderService.buy(orderVO);
    }
}
